perm filename EMACS.DOC[ARK,TEX] blob sn#766826 filedate 1984-08-20 generic text, type T, neo UTF8
BEMACS HEATH (or ZENITH) chart							8/20/84

+-------------+-------------+-------------+
|IC	      |↑	    |DC		  |
| not used    |  Top Screen |  Kill Word  |
| ----------  |  ---------- |  ---------  |
| not used    |   Up Line   |  Kill Char  |
|7	      |8	    |9		  |
+-------------+-------------+-------------+
|← 	      |HM	    |→		  |
| Begin Line  | Back Window | End of Line |
| ----------  | ----------- | ----------- |
| Back Char   | Fwrd Window |  Fwrd Char  |
|4	      |5	    |6		  |
+-------------+-------------+-------------+
|IL	      |↓	    |DL		  |
| Back Pgraph | Botm Screen | Fwrd Pgraph |
| ----------- | ----------- | ----------- |
| Back Word   |  Down Line  |  Fwrd Word  |
|1	      |2	    |3		  |
+-------------+-------------+-------------+
|	      |		    |		  |
|	      |		    |		  |
|    Meta-    |  Ctrl-Meta- |  Next Line  |
|	      |		    |		  |
|0	      |.	    |Enter	  |
+-------------+-------------+-------------+

(For EMACS wizards: Do not use the ESCAPE key as a meta prefix.  Instead use PF1 or the "0" key
on the keypad.  The ESCAPE key is still used to terminate searches, etc., however.)

For example, pressing the `5' key will bring you to the next window worth of your file.
Holding the shift key down while pressing the `5' key (HOME) will move you backward to the
previous window worth of your file.


-----------------------------------------------------------------------------------------------

Commands Common to All Terminals (see also other side)

Whenever you are working with EMACS, the cursor (the blinking underline or white blob)
indicates the position at which editing takes place.  Most of the commands we discuss here
involve moving the cursor or deleting text around the cursor.  The cursor is logically
*between* two characters, and should be thought of as pointing immediately before the character
that it appears on top of.

To insert printing characters into the text you are editing, just type them.  They are inserted
into the text at the cursor, and the cursor moves forward.  Any characters on the line after
the cursor move forward too.  If the text in the buffer is `FOOBAR', with the cursor before the
`B', then if you type `XX' you get `FOOXXBAR', with the cursor still before the `B'.

To correct text you have just inserted, you can use DELETE or RUBOUT.  The DELETE key deletes
the character *before* the cursor (not the one that the cursor is on top of or under; that is
the character *after* the cursor).  The cursor and all characters after it move backwards.
Therefore, if you type a printing character and then type DELETE, they cancel out.  Note that
BACKSPACE does not perform the same function in EMACS as it normally does on a Stanford DEC-20;
use DELETE instead.

To end a line and start typing a new one, press RETURN.  You can delete this line break with
DELETE just as you can delete other characters; if you do so, the two lines are appended.  If
you add too many characters to one line, without breaking it with a RETURN, the line will grow
to occupy two (or more) lines on the screen, with a `!' at the extreme right margin of all but
the last of them.  The `!' says that the following screen line is not really a distinct line in
the file, but just a continuation of a line too long to fit the screen.
BEMACS VT100 chart								8/20/84

-----------------------------------------
|  "PF1"  |  "PF2"  |  "PF3"  |  "PF4"  |
|  Find   |  Save   |  Copy   | Unkill  |   DEL Delete char back
|  file   |  file   | region  |  text   |   BREAK Set mark
|---------+---------+---------+---------|   ESC Prefix-Meta
|   "7"   |   "8"   |   "9"   |   "-"   |
|Beginning|Backwards| End of  |Previous |   Arrow keys are defined to move
| of line |paragraph|  line   | screen  |   cursor one position in direction
|---------+---------+---------+---------|   indicated.
|   "4"   |   "5"   |   "6"   |   ","   |
|Back kill| Delete  |Frwd kill|  Next   |
|  word   |Character|  word   | screen  |
|---------+---------+---------+---------|
|   "1"   |   "2"   |   "3"   | "ENTER" |
|Backwards| Forward | Forward |         |
|  word   |paragraph|  word   |         |
|---------+---------+---------|  Exit   |                                     
|        "0"        |   "."   |  EMACS  |                                     
|       Meta-       |  Ctrl-  |         |                                     
|                   |  Meta-  |         |                                     
-----------------------------------------

(For EMACS wizards: The ESCAPE key can be used a meta prefix.)

For example, pressing the `,' key on the keypad will bring you to the next window worth of your
file.  Pressing the `-' key on the keypad will move you backward to the previous window worth
of your file.


In addition, the keys labeled with arrows, above the main portion of the keyboard, move the
cursor one position in the direction indicated.


-----------------------------------------------------------------------------------------------

Commands Common to All Terminals (see also other side)

The command CTRL/L will clear and redisplay the screen and will move the place where you are
in the file in the middle of the screen if the file is big enough.

To delete to the end of a line, give the command CTRL/K (while on the line).  If you are
already at the end of the line, this will join two lines.

Be careful about using RETURN.  The RETURN key will insert a line break in the input file right
where the cursor is.  If you are in the middle of a line, it will break the line in two right
there.  If you are at the end of a line, it will create a new blank line on the next line
(pushing everything down).  If you are at the beginning of a line, it will move the text down
and insert a blank line where you were.  If you have pressed RETURN accidentally, try pressing
the DELETE key immediately after to undo the effects of the RETURN key.  If you are in the
middle or beginning of the file, use the keypad or keys labeled with arrows to move around.
You *can*, however, safely use the RETURN key at the end of the file to move to the next line
because you are creating a new line.


Saving your file

When you edit a file using EMACS, you are actually modifying a copy of the file that shows on
the screen.  If you make changes to the file and you want the changed version to be saved and
used, say the next time you run TeX, you will have to get EMACS to save your file.  To save
your file, type CTRL/X CTRL/S; that is, hold down CTRL and press `X' and `S', then let go of
CTRL.  You will get a message that your file has been saved.  You can also use the CTRL/X
CTRL/S command as a "backup" command to save your work during your editing session, to prevent
loss of data if the system crashes.


Exiting EMACS

To exit EMACS, type CTRL/X CTRL/Z; that is, hold down CTRL and press `X' and `Z', then let go
of CTRL.  Make sure you have saved your file before exiting EMACS (if you want your changes to
be remembered or used by TeX).